package ncm;

import java.security.PublicKey;

public class Circle{

    public static final double PI = Math.PI;//Π=pi

    private double radius;//半径

    public Circle(double radius)
    {this.radius = radius;}
    public double area()
    {return PI * Math.pow(radius, 2);}//圆的面积Π*半径的平方

    public static void main(String[] args) {
        Circle circle = new Circle(10);
        System.out.println("圆的面积: " + circle.area());
    }
}
